package com.hkyl.hospital.entity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class MedicineExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public MedicineExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andMedicineIdIsNull() {
            addCriterion("medicine_id is null");
            return (Criteria) this;
        }

        public Criteria andMedicineIdIsNotNull() {
            addCriterion("medicine_id is not null");
            return (Criteria) this;
        }

        public Criteria andMedicineIdEqualTo(Integer value) {
            addCriterion("medicine_id =", value, "medicineId");
            return (Criteria) this;
        }

        public Criteria andMedicineIdNotEqualTo(Integer value) {
            addCriterion("medicine_id <>", value, "medicineId");
            return (Criteria) this;
        }

        public Criteria andMedicineIdGreaterThan(Integer value) {
            addCriterion("medicine_id >", value, "medicineId");
            return (Criteria) this;
        }

        public Criteria andMedicineIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("medicine_id >=", value, "medicineId");
            return (Criteria) this;
        }

        public Criteria andMedicineIdLessThan(Integer value) {
            addCriterion("medicine_id <", value, "medicineId");
            return (Criteria) this;
        }

        public Criteria andMedicineIdLessThanOrEqualTo(Integer value) {
            addCriterion("medicine_id <=", value, "medicineId");
            return (Criteria) this;
        }

        public Criteria andMedicineIdIn(List<Integer> values) {
            addCriterion("medicine_id in", values, "medicineId");
            return (Criteria) this;
        }

        public Criteria andMedicineIdNotIn(List<Integer> values) {
            addCriterion("medicine_id not in", values, "medicineId");
            return (Criteria) this;
        }

        public Criteria andMedicineIdBetween(Integer value1, Integer value2) {
            addCriterion("medicine_id between", value1, value2, "medicineId");
            return (Criteria) this;
        }

        public Criteria andMedicineIdNotBetween(Integer value1, Integer value2) {
            addCriterion("medicine_id not between", value1, value2, "medicineId");
            return (Criteria) this;
        }

        public Criteria andMedicineNameIsNull() {
            addCriterion("medicine_name is null");
            return (Criteria) this;
        }

        public Criteria andMedicineNameIsNotNull() {
            addCriterion("medicine_name is not null");
            return (Criteria) this;
        }

        public Criteria andMedicineNameEqualTo(String value) {
            addCriterion("medicine_name =", value, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameNotEqualTo(String value) {
            addCriterion("medicine_name <>", value, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameGreaterThan(String value) {
            addCriterion("medicine_name >", value, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameGreaterThanOrEqualTo(String value) {
            addCriterion("medicine_name >=", value, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameLessThan(String value) {
            addCriterion("medicine_name <", value, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameLessThanOrEqualTo(String value) {
            addCriterion("medicine_name <=", value, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameLike(String value) {
            addCriterion("medicine_name like", value, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameNotLike(String value) {
            addCriterion("medicine_name not like", value, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameIn(List<String> values) {
            addCriterion("medicine_name in", values, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameNotIn(List<String> values) {
            addCriterion("medicine_name not in", values, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameBetween(String value1, String value2) {
            addCriterion("medicine_name between", value1, value2, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicineNameNotBetween(String value1, String value2) {
            addCriterion("medicine_name not between", value1, value2, "medicineName");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceIsNull() {
            addCriterion("medicine_price is null");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceIsNotNull() {
            addCriterion("medicine_price is not null");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceEqualTo(BigDecimal value) {
            addCriterion("medicine_price =", value, "medicinePrice");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceNotEqualTo(BigDecimal value) {
            addCriterion("medicine_price <>", value, "medicinePrice");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceGreaterThan(BigDecimal value) {
            addCriterion("medicine_price >", value, "medicinePrice");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("medicine_price >=", value, "medicinePrice");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceLessThan(BigDecimal value) {
            addCriterion("medicine_price <", value, "medicinePrice");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("medicine_price <=", value, "medicinePrice");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceIn(List<BigDecimal> values) {
            addCriterion("medicine_price in", values, "medicinePrice");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceNotIn(List<BigDecimal> values) {
            addCriterion("medicine_price not in", values, "medicinePrice");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("medicine_price between", value1, value2, "medicinePrice");
            return (Criteria) this;
        }

        public Criteria andMedicinePriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("medicine_price not between", value1, value2, "medicinePrice");
            return (Criteria) this;
        }

        public Criteria andMedicineNumIsNull() {
            addCriterion("medicine_num is null");
            return (Criteria) this;
        }

        public Criteria andMedicineNumIsNotNull() {
            addCriterion("medicine_num is not null");
            return (Criteria) this;
        }

        public Criteria andMedicineNumEqualTo(Integer value) {
            addCriterion("medicine_num =", value, "medicineNum");
            return (Criteria) this;
        }

        public Criteria andMedicineNumNotEqualTo(Integer value) {
            addCriterion("medicine_num <>", value, "medicineNum");
            return (Criteria) this;
        }

        public Criteria andMedicineNumGreaterThan(Integer value) {
            addCriterion("medicine_num >", value, "medicineNum");
            return (Criteria) this;
        }

        public Criteria andMedicineNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("medicine_num >=", value, "medicineNum");
            return (Criteria) this;
        }

        public Criteria andMedicineNumLessThan(Integer value) {
            addCriterion("medicine_num <", value, "medicineNum");
            return (Criteria) this;
        }

        public Criteria andMedicineNumLessThanOrEqualTo(Integer value) {
            addCriterion("medicine_num <=", value, "medicineNum");
            return (Criteria) this;
        }

        public Criteria andMedicineNumIn(List<Integer> values) {
            addCriterion("medicine_num in", values, "medicineNum");
            return (Criteria) this;
        }

        public Criteria andMedicineNumNotIn(List<Integer> values) {
            addCriterion("medicine_num not in", values, "medicineNum");
            return (Criteria) this;
        }

        public Criteria andMedicineNumBetween(Integer value1, Integer value2) {
            addCriterion("medicine_num between", value1, value2, "medicineNum");
            return (Criteria) this;
        }

        public Criteria andMedicineNumNotBetween(Integer value1, Integer value2) {
            addCriterion("medicine_num not between", value1, value2, "medicineNum");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionIsNull() {
            addCriterion("medicine_description is null");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionIsNotNull() {
            addCriterion("medicine_description is not null");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionEqualTo(String value) {
            addCriterion("medicine_description =", value, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionNotEqualTo(String value) {
            addCriterion("medicine_description <>", value, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionGreaterThan(String value) {
            addCriterion("medicine_description >", value, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionGreaterThanOrEqualTo(String value) {
            addCriterion("medicine_description >=", value, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionLessThan(String value) {
            addCriterion("medicine_description <", value, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionLessThanOrEqualTo(String value) {
            addCriterion("medicine_description <=", value, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionLike(String value) {
            addCriterion("medicine_description like", value, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionNotLike(String value) {
            addCriterion("medicine_description not like", value, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionIn(List<String> values) {
            addCriterion("medicine_description in", values, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionNotIn(List<String> values) {
            addCriterion("medicine_description not in", values, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionBetween(String value1, String value2) {
            addCriterion("medicine_description between", value1, value2, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicineDescriptionNotBetween(String value1, String value2) {
            addCriterion("medicine_description not between", value1, value2, "medicineDescription");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsIsNull() {
            addCriterion("medicine_precautions is null");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsIsNotNull() {
            addCriterion("medicine_precautions is not null");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsEqualTo(String value) {
            addCriterion("medicine_precautions =", value, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsNotEqualTo(String value) {
            addCriterion("medicine_precautions <>", value, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsGreaterThan(String value) {
            addCriterion("medicine_precautions >", value, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsGreaterThanOrEqualTo(String value) {
            addCriterion("medicine_precautions >=", value, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsLessThan(String value) {
            addCriterion("medicine_precautions <", value, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsLessThanOrEqualTo(String value) {
            addCriterion("medicine_precautions <=", value, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsLike(String value) {
            addCriterion("medicine_precautions like", value, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsNotLike(String value) {
            addCriterion("medicine_precautions not like", value, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsIn(List<String> values) {
            addCriterion("medicine_precautions in", values, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsNotIn(List<String> values) {
            addCriterion("medicine_precautions not in", values, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsBetween(String value1, String value2) {
            addCriterion("medicine_precautions between", value1, value2, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andMedicinePrecautionsNotBetween(String value1, String value2) {
            addCriterion("medicine_precautions not between", value1, value2, "medicinePrecautions");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andAvg1IsNull() {
            addCriterion("avg1 is null");
            return (Criteria) this;
        }

        public Criteria andAvg1IsNotNull() {
            addCriterion("avg1 is not null");
            return (Criteria) this;
        }

        public Criteria andAvg1EqualTo(String value) {
            addCriterion("avg1 =", value, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1NotEqualTo(String value) {
            addCriterion("avg1 <>", value, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1GreaterThan(String value) {
            addCriterion("avg1 >", value, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1GreaterThanOrEqualTo(String value) {
            addCriterion("avg1 >=", value, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1LessThan(String value) {
            addCriterion("avg1 <", value, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1LessThanOrEqualTo(String value) {
            addCriterion("avg1 <=", value, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1Like(String value) {
            addCriterion("avg1 like", value, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1NotLike(String value) {
            addCriterion("avg1 not like", value, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1In(List<String> values) {
            addCriterion("avg1 in", values, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1NotIn(List<String> values) {
            addCriterion("avg1 not in", values, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1Between(String value1, String value2) {
            addCriterion("avg1 between", value1, value2, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg1NotBetween(String value1, String value2) {
            addCriterion("avg1 not between", value1, value2, "avg1");
            return (Criteria) this;
        }

        public Criteria andAvg2IsNull() {
            addCriterion("avg2 is null");
            return (Criteria) this;
        }

        public Criteria andAvg2IsNotNull() {
            addCriterion("avg2 is not null");
            return (Criteria) this;
        }

        public Criteria andAvg2EqualTo(String value) {
            addCriterion("avg2 =", value, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2NotEqualTo(String value) {
            addCriterion("avg2 <>", value, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2GreaterThan(String value) {
            addCriterion("avg2 >", value, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2GreaterThanOrEqualTo(String value) {
            addCriterion("avg2 >=", value, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2LessThan(String value) {
            addCriterion("avg2 <", value, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2LessThanOrEqualTo(String value) {
            addCriterion("avg2 <=", value, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2Like(String value) {
            addCriterion("avg2 like", value, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2NotLike(String value) {
            addCriterion("avg2 not like", value, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2In(List<String> values) {
            addCriterion("avg2 in", values, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2NotIn(List<String> values) {
            addCriterion("avg2 not in", values, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2Between(String value1, String value2) {
            addCriterion("avg2 between", value1, value2, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg2NotBetween(String value1, String value2) {
            addCriterion("avg2 not between", value1, value2, "avg2");
            return (Criteria) this;
        }

        public Criteria andAvg3IsNull() {
            addCriterion("avg3 is null");
            return (Criteria) this;
        }

        public Criteria andAvg3IsNotNull() {
            addCriterion("avg3 is not null");
            return (Criteria) this;
        }

        public Criteria andAvg3EqualTo(String value) {
            addCriterion("avg3 =", value, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3NotEqualTo(String value) {
            addCriterion("avg3 <>", value, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3GreaterThan(String value) {
            addCriterion("avg3 >", value, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3GreaterThanOrEqualTo(String value) {
            addCriterion("avg3 >=", value, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3LessThan(String value) {
            addCriterion("avg3 <", value, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3LessThanOrEqualTo(String value) {
            addCriterion("avg3 <=", value, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3Like(String value) {
            addCriterion("avg3 like", value, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3NotLike(String value) {
            addCriterion("avg3 not like", value, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3In(List<String> values) {
            addCriterion("avg3 in", values, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3NotIn(List<String> values) {
            addCriterion("avg3 not in", values, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3Between(String value1, String value2) {
            addCriterion("avg3 between", value1, value2, "avg3");
            return (Criteria) this;
        }

        public Criteria andAvg3NotBetween(String value1, String value2) {
            addCriterion("avg3 not between", value1, value2, "avg3");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}